Skip to content

ENH: Algorithm dispatch for OoOC filter optimizations#1545

Merged
imikejackson merged 1 commit intoBlueQuartzSoftware:developfrom
joeykleingers:worktree-identify-sample-optimizations
Mar 5, 2026
Merged

ENH: Algorithm dispatch for OoOC filter optimizations#1545
imikejackson merged 1 commit intoBlueQuartzSoftware:developfrom
joeykleingers:worktree-identify-sample-optimizations

Conversation

@joeykleingers
Copy link
Contributor

@joeykleingers joeykleingers commented Feb 24, 2026

Summary

  • Add reusable AlgorithmDispatch.hpp utility (IsOutOfCore, AnyOutOfCore, DispatchAlgorithm) for dispatching between in-core and OOC algorithm implementations at runtime
  • Add ForceOocAlgorithm() static flag and ForceOocAlgorithmGuard RAII class so unit tests can exercise the OOC algorithm path even in in-core builds
  • Add documentation (docs/AlgorithmDispatch.md) explaining when and how to use algorithm dispatch

Files Changed

  • src/simplnx/Utilities/AlgorithmDispatch.hpp — Runtime dispatch utilities
  • docs/AlgorithmDispatch.md — Usage documentation
  • CMakeLists.txt — Add header to build

Test Plan

  • Infrastructure is header-only; no runtime behavior changes until filters adopt it
  • Builds cleanly on both in-core and OOC configurations

@joeykleingers joeykleingers added the enhancement New feature or request label Feb 24, 2026
@joeykleingers joeykleingers force-pushed the worktree-identify-sample-optimizations branch 2 times, most recently from 1bda2d9 to c88c7f6 Compare February 24, 2026 18:43
Copy link
Contributor

@imikejackson imikejackson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As we discussed, there needs to be a clear path to exercise both code paths even with out-of-core is not being built. This PR should not be merged until this is figured out.

@joeykleingers joeykleingers force-pushed the worktree-identify-sample-optimizations branch 2 times, most recently from fb7dd1b to 8e79b9c Compare February 28, 2026 18:42
@joeykleingers joeykleingers force-pushed the worktree-identify-sample-optimizations branch from 8e79b9c to fd57058 Compare February 28, 2026 18:43
@joeykleingers joeykleingers changed the title ENH: Add algorithm dispatch for IdentifySample OOC optimization WIP: ENH: Add algorithm dispatch for IdentifySample OOC optimization Feb 28, 2026
@joeykleingers joeykleingers force-pushed the worktree-identify-sample-optimizations branch from fd57058 to 4e6e1f6 Compare February 28, 2026 19:57
@joeykleingers joeykleingers marked this pull request as draft February 28, 2026 20:02
@joeykleingers joeykleingers changed the title WIP: ENH: Add algorithm dispatch for IdentifySample OOC optimization WIP: ENH: Algorithm dispatch for OOC filter optimizations Feb 28, 2026
@joeykleingers joeykleingers force-pushed the worktree-identify-sample-optimizations branch from 4e6e1f6 to 9004622 Compare February 28, 2026 20:03
@joeykleingers joeykleingers force-pushed the worktree-identify-sample-optimizations branch from 9004622 to 4070458 Compare March 2, 2026 20:15
@joeykleingers joeykleingers force-pushed the worktree-identify-sample-optimizations branch from 8cc58af to 78aaf20 Compare March 4, 2026 19:04
@joeykleingers joeykleingers changed the title WIP: ENH: Algorithm dispatch for OOC filter optimizations ENH: Add AlgorithmDispatch infrastructure for OOC algorithm selection Mar 4, 2026
@joeykleingers joeykleingers changed the title ENH: Add AlgorithmDispatch infrastructure for OOC algorithm selection ENH: Algorithm dispatch for OOC filter optimizations Mar 4, 2026
@joeykleingers joeykleingers marked this pull request as ready for review March 4, 2026 19:28
@joeykleingers joeykleingers force-pushed the worktree-identify-sample-optimizations branch 2 times, most recently from 1204f12 to 0cf3dee Compare March 4, 2026 19:32
Add reusable AlgorithmDispatch.hpp utility with IsOutOfCore(),
AnyOutOfCore(), ForceOocAlgorithm(), ForceOocAlgorithmGuard, and
DispatchAlgorithm<InCore, OOC>() so filters can dispatch to separate
in-core and out-of-core algorithm implementations at runtime.

Includes documentation in docs/AlgorithmDispatch.md.

No filters are using this infrastructure yet — it is provided as
reusable scaffolding for future OOC optimization work.
@joeykleingers joeykleingers force-pushed the worktree-identify-sample-optimizations branch from 0cf3dee to 6d65499 Compare March 4, 2026 19:32
@imikejackson imikejackson changed the title ENH: Algorithm dispatch for OOC filter optimizations ENH: Algorithm dispatch for OoOC filter optimizations Mar 4, 2026
Copy link
Contributor

@imikejackson imikejackson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Somewhere in there is probably a way to use constexpr to compile out some of the logic but lets get this in.

@imikejackson imikejackson enabled auto-merge (squash) March 4, 2026 22:42
@imikejackson imikejackson merged commit 43695ad into BlueQuartzSoftware:develop Mar 5, 2026
7 of 8 checks passed
@joeykleingers joeykleingers deleted the worktree-identify-sample-optimizations branch March 5, 2026 01:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request Out-of-Core

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants